function ajaxZhibiao(domid,zhibiao,title,subtitle) {
	var chart1 = echarts.init(document.getElementById(domid), "vintage");
	var url = "sum.ins?zhibiao="+zhibiao;
	$.ajax({
		type : 'GET',
		url : url,
		dataType : "json",
		success : function(typeSum) {
			
			console.log(typeSum);
			processed = []
			points = {
				'xAxis' : [],
				'yAxis' : []
			}
			var sum = 0;
			var funnelData = [];
			var pieData = [];
			// for (var i= Math.min(typeSum.length-1,6) ; i >=0 ; i--){
			for (var i = 0; i < Math.min(typeSum.length, 7); i++) {
				sum += typeSum[i].value;
				processed.push([ typeSum[i].name, typeSum[i].value ]);
				points.xAxis.push(typeSum[i].name);
				points.yAxis.push(typeSum[i].value);
				pieData.push({
					name : typeSum[i].name,
					value : typeSum[i].value
				});
			}
			// for (var i= Math.min(typeSum.length-1,6) ; i >=0 ; i--){
			for (var i = 0; i < Math.min(typeSum.length, 7); i++) {
				var num = typeSum[i].value / sum * 100;
				funnelData.push({
					name : typeSum[i].name,
					value : num.toFixed(2)
				});
			}

			var option = {
				title : [ {
					text : title,
					subtext : '',
					left : 'center',
				}, {
					right : 80,
					top : 40,
					width : 100,
					text : '总数: ' + sum + '个',
					textStyle : {
						fontSize : 16
					}
				} ],
				legend : {
					bottom : 60,
					right : 10,
					orient : 'vertical',
					data : points.xAxis
				},
				grid : {
					right : '50%',
					top : 100,
					bottom : 100,
					width : '40%'
				},
				xAxis : {
					type : 'category',
					data : points.xAxis
				},
				yAxis : {
					type : 'value',
					position : 'top',
					boundaryGap : [ 0, 0.01 ]
				},
				toolbox : {
					show : true,
					feature : {
						dataView : {
							readOnly : false
						},
						magicType : {
							show : true,
							type : [ 'line', 'bar' ]
						},
						restore : {},
						saveAsImage : {}
					}
				},
				tooltip : {
					trigger : 'item',
				// formatter: "{a} <br/>{b}: {c} ({d}%)"
				},
				dataZoom : [ {
					type : 'slider',
					show : true,
					xAxisIndex : [ 0 ],
					start : 1,
					end : 55
				}, {
					type : 'inside',
					xAxisIndex : [ 0 ],
					start : 1,
					end : 55
				} ],
				series : [
						{
							type : 'line',
							data : points.yAxis,
							tooltip : {
							// trigger: 'item',
							// formatter: "{a} <br/>{c}"
							},
						},
						{
							name : subtitle,
							data : processed,
							type : 'scatter',
							top : 300,
							symbolSize : function(typeSum) {
								return Math.max(Math.sqrt(typeSum[1]) * 2,20);
							},
							label : {
								emphasis : {
									show : true,
									formatter : function(param) {
										return param.data[0];
									},
									position : 'top'
								}
							},
							tooltip : {
								trigger : 'item',
								formatter : "{a} <br/>{c}"
							},
							itemStyle : {
								normal : {
									shadowBlur : 10,
									shadowColor : 'rgba(120, 36, 50, 0.5)',
									shadowOffsetY : 5,
									color : new echarts.graphic.RadialGradient(
											0.4, 0.3, 1, [ {
												offset : 0,
												color : 'rgb(251, 118, 123)'
											}, {
												offset : 1,
												color : 'rgb(204, 46, 72)'
											} ])
								}
							}
						}, {
							name : subtitle,
							type : 'pie',
							center : [ '70%', '35%' ],
							radius : [ '30%', '45%' ],
							tooltip : {
								trigger : 'item',
								formatter : "{a} <br/>{b}: {c} ({d}%)"
							},
							itemStyle : {
								shadowBlur : 1000,
								shadowColor : 'rgba(40, 40, 40,0.5)',
							},
							data : pieData
						}, {
							name : subtitle,
							type : 'funnel',
							left : '55%',
							top : '60%',
							bottom : 60,
							width : '30%',
							min : 0,
							max : 100,
							minSize : '0%',
							maxSize : '100%',
							sort : 'descending',
							tooltip : {
								trigger : 'item',
								formatter : "{a} <br/>{b} : {c}%"
							},
							data : funnelData
						} ]
			};

			chart1.setOption(option);
		},
		error : function(data) {
			alert("请检查网络连接");
		}
	});
}

function ajaxFbDetail(domid) {
	// var myChart1 = echarts.init(document.getElementById("con1"));
	var myChart1 = echarts.init(document.getElementById(domid));
	var url = "fb.ins";
	$.ajax({
		type : 'GET',
		// url : "<%=basePath%>institution/dwfb.ins",
		url : url,
		dataType : "json",
		success : function(points) {
			var option = {
			    bmap: {
			        center: [126.631007, 48.308762],
			        zoom: 6,	        
			        roam: true,
			        enableMapClick: false,
			        mapStyle: {
			            styleJson: [{
			                "featureType": "all",
			                "elementType": "all",
			                "stylers": {
			                    "lightness": 47,
			                    "saturation": -100
			                }
			            }, {
			                "featureType": "highway",
			                "elementType": "geometry.fill",
			                "stylers": {
			                    "color": "#ffffff"
			                }
			            }, {
			                "featureType": "poi",
			                "elementType": "labels.icon",
			                "stylers": {
			                    "visibility": "off"
			                }
			            }, {
			                "featureType": "road",
			                "elementType": "labels",
			                "stylers": {
			                    "visibility": "off"
			                }
			            }]
			        }
			    }
			}

			myChart1.setOption(option);
			setTimeout(init, 0)

			function init() {
			    initMap();
			    initMapv();
			}

			function getMap() {
			    return myChart1.getModel().getComponent('bmap').getBMap();
			}

			function initMap() {
			    var top_left_navigation = new BMap.NavigationControl({
			        type: BMAP_NAVIGATION_CONTROL_SMALL
			    });
			    var map = getMap();

			    // map.centerAndZoom("̕ם", 13);
			    map.addControl(top_left_navigation);
			    map.disableDoubleClickZoom();
			    return map;
			}

			function initMapv() {

			    var map = getMap();
				// 构造数据
			    var data = [];
			    var randomCount = points.length;
			    while (randomCount--) {
			        var cityCenter = points[randomCount];
			        data.push({
			            geometry: {
			                type: 'Point',
			                coordinates: [cityCenter[0], cityCenter[1]]
			            },
			            count: cityCenter[2]
			        });
			    }

			    var dataSet = new mapv.DataSet(data);
			    // console.log(dataSet)

			    var options = {
			        fillStyle: '#99C1DB',
			        strokeStyle: 'white', 
			        lineWidth: 1,
			        // shadowColor: 'white',
			        // shadowBlur: 1,
			        size: 50,
			        globalAlpha: 1,
			        gradient: {
			        	0.05: "rgba(213, 58, 53,0.3)",			    		
			        	0.1: "rgba(213, 58, 53,0.5)",
			    		0.15: "rgba(213, 58, 53,0.7)",
			    		0.2: "rgba(213, 58, 53,0.8)",
			    		0.6: "rgba(213, 58, 53,0.9)",
				    	1.0: "rgba(213, 58, 53,1)"
			        },
			        label: {
			            show: true,
			            fillStyle: 'white',
			            average: true
			                // shadowColor: 'black',
			                // font: '20px Arial',
			                // shadowBlur: 10,
			        },
			        max: 100,
			        draw: 'grid',
			        methods: { // 点击事件的回调函数
			            click: function(item) { 
			                // console.log(item);
			            }
			        }
			    }
				
			    var mapvLayer = new mapv.baiduMapLayer(map, dataSet, options);
			}
		},
		error : function(data) {
			alert("请检查网络连接");
		}
	});
	
}


function ajaxFbCity(domid,title,subtitle) {
	// var myChart1 = echarts.init(document.getElementById("con1"));
	var myChart2 = echarts.init(document.getElementById(domid),'vintage');
	var url = "fb2.ins";
	$.ajax({
		type : 'GET',
		// url : "<%=basePath%>institution/dwfb2.ins",
		url : url,
		dataType : "json",
		success : function(data) {			
			var geoCoordMap = {
			    "大庆市":[125.03,46.58],
				"牡丹江市":[129.58,44.59],
				"齐齐哈尔市":[123.97,47.33],
				"哈尔滨市":[126.63,45.75],
				"大兴安岭地区":[124.20,51.99],
				"鹤岗市":[130.29,47.34],
				"黑河市":[127.50,50.24],
				"鸡西市":[130.94,45.32],
				"佳木斯市":[130.28,46.81],
				"七台河市":[131.02,45.78],
				"双鸭山市":[131.17,46.66],
				"绥化市":[126.99,46.65],
				"伊春市":[128.91,47.73]
			};
			
			var convertData = function (data) {
			    var res = [];
			    for (var i = 0; i < data.length; i++) {
			        var geoCoord = geoCoordMap[data[i].name];
			        if (geoCoord) {
			            res.push({
			                name: data[i].name,
			                value: geoCoord.concat(data[i].value)
			            });
			        }
			    }
			    return res;
			};

			var convertedData = [
			    convertData(data),
			    convertData(data.sort(function (a, b) {
			        return b.value - a.value;
			    }).slice(0, 5))
			];

			var option = {
			    animation: true,
			    animationDuration: 1000,
			    animationEasing: 'cubicInOut',
			    animationDurationUpdate: 1000,
			    animationEasingUpdate: 'cubicInOut',
			    title: [
			        {
			            text: title,
			            subtext: '',
			            left: 'center',
			            textStyle: {
			  // color: '#fff'
			            }
			        },
			        {
			            id: 'statistic',
			            right: 80,
			            top: 40,
			            width: 100,
			            textStyle: {
			  // color: '#fff',
			                fontSize: 16
			            }
			        }
			    ],
			    toolbox: {
			        iconStyle: {
			            normal: {
			 // borderColor: '#fff'
			            },
			            emphasis: {
			 // borderColor: '#b1e4ff'
			            }
			        },
			        feature: {
			        	dataView :{show: true},
						magicType : {
							show : true,
							type : [ 'line', 'bar' ]
						},
			            brush: {
			                type: ['rect', 'polygon', 'clear']
			            },
			            saveAsImage : {show: true}
			        }
			    },
			    brush: {
			        outOfBrush: {
			 // color: '#abc'
			        },
			        brushStyle: {
			            borderWidth: 2,
// color:'#FFF5EE'
			            color: 'rgba(255,255,255,0.2)',
			            borderColor: 'rgba(0,0,0,0.3)',
			        },
			        seriesIndex: [0, 1],
			        throttleType: 'debounce',
			        throttleDelay: 300,
			        geoIndex: 0
			    },
			    geo: {
			        map: '黑龙江',
					geoIndex: 0,
			        left: '0',
			        right: '55%',
			        center: [126.631007, 48.308762],
			        zoom: 1,
			        label: {
			            emphasis: {
			                show: false
			            }
			        },
			        roam: true,
			        itemStyle: {
			            normal: {
			                areaColor: '#FFE4C4',
			                borderColor: '#111'
			            },
			            emphasis: {
// areaColor: '#2a333d'
			            }
			        }
			    },
			    tooltip : {
			        trigger: 'item'
			    },
			    grid: {
			        right: '20%',
			        top: 100,
			        bottom: 120,
			        width: '20%'
			    },
			    xAxis: {
			        type: 'value',
			        scale: true,
			        position: 'top',
			        // boundaryGap: false,
			        // splitLine: {show: false},
			        // axisLine: {show: false},
			        // axisTick: {show: false},
			        axisLabel: {margin: 2, textStyle: {color: '#aaa'}},
			    },
			    yAxis: {
					// axisLabel: {margin: 2},
					type: 'category',
			        name: 'TOP',
			        nameGap: 16,
			        // axisLine: {show: false, lineStyle: {color: '#ddd'}},
			        // axisTick: {show: false, lineStyle: {color: '#ddd'}},
			        // axisLabel: {interval: 0, textStyle: {color: '#ddd'}},
					axisLabel: {interval: 0},
			        data: []
			    },
// visualMap : {
// min : 0,
// max : 400,
// left : 'left',
// top : 'bottom',
// seriesIndex: [0],
// text : [ '高', '低' ], // 文本，默认为数值文本
// calculable : true
// },
			    series : [
			        {
			            name: subtitle,
			            type: 'scatter',
						zlevel: 1,
			            coordinateSystem: 'geo',
						geoIndex : 0,
			            data: convertedData[0],
			            symbolSize: function (val) {
			                return Math.min(Math.max(Math.sqrt(val[2]),12),20);
			                // return 12;
			            },
			            label: {
			                normal: {
			                    formatter: '{b}',
			                    position: 'right',
			                    show: false
			                },
			                emphasis: {
			                    show: true
			                }
			            },
			            itemStyle: {
			                normal: {
			                    // color: '#f2e2a0'
			                    // color: '#FF4500'
			                    color: '#dd625e'
			                }
			            }
			        },
			        {
			            name: subtitle+'Top5',
			            type: 'effectScatter',
			            coordinateSystem: 'geo',
						geoIndex : 0,
			            data: convertedData[1],
			            symbolSize: function (val) {
			                // return 15;
			            	return Math.min(Math.max(Math.sqrt(val[2])+5,15),30);
			            },
			            showEffectOn: 'render',
			            rippleEffect: {
			                brushType: 'stroke',
			                scale : 2.5
			            },
			            hoverAnimation: true,
			            label: {
			                normal: {
			                    formatter: '{b}',
			                    position: 'right',
			                    show: true
			                }
			            },
			            itemStyle: {
			                normal: {
			 // color: '#f4e925',
			 					// color: '#ed8888',
			 					color: '#da3a35',
			                    shadowBlur: 10,
			                    shadowColor: '#333'
			                }
			            },
			            zlevel: 2
			        },
			        {
			            id: 'bar',
			            zlevel: 3,
			            type: 'bar',
			            symbol: 'none',
			            itemStyle: {
			                normal: {
			    // color: '#ddb926'
			                }
			            },
			            data: []
			        },
					{
						id: 'pie1',
			    		name:subtitle,
						zlevel: 5,
						type: 'pie',
			            roseType:'area',
			            center : ['80%', '70%'],
			            radius: ['0', '25%'],
			            roseType : 'area',
						itemStyle: {
							normal: {
								color: 'white',
								// borderColor: '#ddb926'
								borderColor: '#512da8'
							}
						},
						label: {
			                normal: {
			                    show: false
			                },
			                emphasis: {
			                    show: false
			                }
			            },
			            lableLine: {
			                normal: {
			                    show: false
			                },
			                emphasis: {
			                    show: false
			                }
			            },
						tooltip : {
							trigger: 'item',
							formatter: "{a} <br/>{b} : {c} ({d}%)"
						},
			            data: []
			        },
					{
						id: 'pie2',
						name : subtitle,
						type: 'pie',
						data: [],
						center : ['80%', '70%'],
						radius: ['25%', '45%'],
						zlevel: 4,
						itemStyle: {
							normal: {
// color: '#ddb926',
								borderColor: 'white'
								}
						},
						label: {
						    normal: {
						        position: 'inside'
						    }
						},
						tooltip : {
							trigger: 'item',
							formatter: "{b}"
						}
					}
			    ]
			};

			myChart2.on('brushselected', renderBrushed);

			setTimeout(function () {
				myChart2.setOption(option);
			    myChart2.dispatchAction({
			        type: 'brush',
			        areas: [
			            {
			                geoIndex: 0,
			                brushType: 'polygon',
			                coordRange: [[134.353973, 47.444758],[134.548291, 47.479854],[134.589466, 47.530121],[134.692662, 47.608771],[134.792045, 47.745141],[134.685955, 47.824819],[134.665147, 47.907579],[134.561576, 47.98764],[134.581559, 48.047612],[134.662817, 48.146563],[134.686836, 48.261997],[134.778312, 48.295093],[134.922851, 48.351413],[135.096231, 48.408323],[135.016339, 48.442324],[134.880382, 48.438165],[134.831872, 48.381956],[134.700882, 48.418616],[134.546457, 48.424642],[134.393274, 48.391822],[134.198326, 48.388659],[134.048715, 48.34902],[133.977788, 48.307843],[133.844831, 48.282028],[133.739103, 48.221615],[133.593407, 48.192881],[133.500825, 48.12305],[133.385197, 48.127505],[133.261244, 48.127424],[133.05731, 48.114893],[132.940189, 48.024826],[132.784668, 47.939091],[132.672549, 47.922005],[132.627121, 47.835789],[132.577384, 47.727625],[132.401568, 47.753686],[132.306655, 47.754873],[132.209856, 47.72079],[132.032304, 47.72111],[131.965194, 47.670875],[131.842526, 47.673326],[131.659224, 47.674225],[131.574263, 47.680838],[131.439287, 47.75404],[131.245235, 47.738684],[131.024579, 47.698211],[130.962728, 47.836342],[130.853439, 47.959563],[130.702844, 48.04921],[130.678079, 48.137486],[130.77669, 48.242513],[130.847901, 48.305343],[130.78409, 48.359318],[130.754006, 48.520862],[130.634752, 48.497464],[130.608235, 48.602963],[130.573755, 48.68593],[130.699953, 48.871056],[130.523962, 48.862994],[130.440488, 48.914195],[130.247311, 48.869627],[130.115484, 48.963593],[129.973505, 49.037538],[129.941113, 49.09645],[129.858329, 49.132763],[129.783857, 49.189723],[129.716121, 49.302499],[129.582524, 49.291208],[129.530067, 49.425936],[129.381491, 49.416572],[129.344531, 49.361421],[129.147058, 49.361333],[129.054632, 49.414439],[128.877894, 49.498766],[128.756079, 49.505658],[128.810249, 49.580856],[128.735311, 49.574323],[128.560396, 49.609922],[128.377963, 49.569627],[128.292532, 49.57244],[128.166489, 49.549335],[128.039634, 49.572253],[127.929241, 49.587415],[127.861745, 49.598506],[127.720137, 49.6614],[127.573619, 49.795335],[127.506303, 49.985971],[127.586224, 50.135994],[127.613711, 50.238868],[127.381705, 50.300341],[127.379861, 50.40953],[127.301009, 50.47881],[127.366075, 50.548282],[127.348476, 50.629195],[127.313426, 50.753652],[127.217019, 50.82632],[127.052253, 50.974728],[126.958651, 51.056168],[126.93145, 51.244617],[126.988944, 51.334786],[126.883936, 51.321997],[126.929226, 51.265346],[126.832787, 51.279347],[126.850839, 51.352444],[126.915919, 51.412738],[126.791752, 51.453531],[126.851299, 51.528188],[126.689927, 51.595965],[126.748475, 51.648176],[126.741555, 51.717591],[126.673423, 51.742234],[126.623553, 51.789456],[126.562539, 51.87974],[126.469791, 51.954548],[126.454006, 52.023814],[126.518818, 52.042984],[126.549247, 52.09937],[126.464555, 52.171295],[126.314533, 52.211209],[126.387785, 52.27621],[126.447991, 52.292243],[126.326456, 52.328403],[126.362762, 52.384605],[126.259604, 52.482142],[126.220753, 52.531145],[126.074492, 52.609376],[126.029347, 52.586436],[126.003196, 52.681405],[126.078272, 52.708708],[126.122575, 52.764022],[126.042994, 52.805054],[125.992815, 52.764625],[125.945109, 52.789711],[125.843692, 52.904408],[125.761593, 52.888617],[125.686064, 52.866639],[125.674853, 52.923825],[125.738674, 52.975176],[125.65897, 53.038257],[125.584591, 53.081996],[125.511207, 53.101438],[125.409476, 53.134876],[125.289261, 53.168063],[125.143563, 53.210677],[125.046138, 53.208831],[124.949088, 53.190241],[124.915253, 53.11841],[124.840258, 53.150944],[124.731078, 53.178513],[124.691851, 53.209302],[124.532265, 53.208629],[124.438289, 53.233829],[124.374436, 53.284379],[124.297569, 53.352587],[124.168581, 53.366884],[124.098738, 53.377362],[124.039948, 53.402315],[123.872788, 53.495651],[123.712228, 53.501455],[123.595046, 53.553051],[123.541514, 53.507664],[123.529221, 53.564161],[123.517092, 53.509584],[123.471021, 53.537596],[123.261258, 53.564727],[123.152454, 53.50429],[122.906314, 53.46991],[122.680642, 53.46497],[122.442787, 53.450454],[122.354951, 53.508767],[122.196954, 53.476939],[122.10463, 53.42873],[121.883557, 53.432319],[121.743601, 53.392697],[121.603838, 53.358264],[121.585144, 53.296639],[121.688792, 53.24335],[121.676717, 53.174444],[121.760737, 53.152912],[121.782945, 53.095759],[121.809723, 53.056118],[121.781158, 53.021529],[121.695907, 52.962657],[121.646485, 52.90955],[121.624412, 52.86757],[121.545041, 52.8076],[121.472291, 52.762255],[121.389586, 52.692385],[121.301129, 52.668616],[121.208594, 52.614825],[121.232929, 52.583319],[121.337886, 52.55813],[121.396102, 52.531846],[121.468059, 52.496808],[121.523076, 52.46743],[121.575741, 52.462369],[121.662099, 52.439332],[121.679435, 52.412431],[121.708071, 52.36554],[121.741116, 52.317157],[121.834045, 52.294327],[121.905801, 52.286466],[121.984568, 52.332831],[122.03034, 52.373609],[122.078953, 52.42453],[122.117981, 52.4541],[122.146811, 52.501885],[122.213435, 52.474361],[122.296891, 52.48391],[122.338216, 52.438201],[122.384091, 52.4021],[122.470742, 52.366912],[122.486989, 52.320142],[122.543785, 52.291821],[122.656361, 52.27957],[122.707119, 52.261904],[122.782169, 52.262672],[122.781887, 52.215681],[122.742685, 52.155068],[122.643238, 52.140218],[122.644971, 52.091067],[122.662097, 52.063101],[122.671904, 52.002539],[122.715584, 51.981365],[122.725395, 51.951426],[122.736617, 51.875671],[122.739746, 51.838515],[122.77237, 51.786976],[122.766356, 51.74163],[122.802559, 51.689131],[122.831489, 51.638132],[122.863837, 51.606946],[122.865477, 51.57473],[122.894302, 51.541957],[122.894128, 51.509582],[122.871364, 51.475247],[122.904995, 51.44025],[122.974715, 51.394069],[122.982388, 51.343581],[123.04855, 51.321614],[123.137561, 51.303659],[123.176467, 51.293167],[123.247502, 51.272192],[123.349666, 51.279874],[123.411493, 51.284926],[123.47154, 51.29683],[123.55783, 51.295758],[123.607731, 51.317998],[123.667007, 51.328484],[123.687618, 51.376823],[123.729099, 51.406057],[123.805485, 51.36562],[123.874105, 51.342858],[123.9393, 51.31006],[124.072785, 51.326724],[124.140002, 51.346473],[124.184847, 51.346232],[124.24042, 51.350563],[124.276214, 51.311611],[124.337366, 51.301289],[124.362266, 51.285999],[124.424111, 51.29873],[124.433638, 51.349785],[124.49037, 51.384914],[124.573908, 51.374351],[124.637372, 51.331622],[124.756452, 51.362232],[124.791606, 51.401227],[124.895489, 51.417278],[124.947049, 51.461818],[124.930071, 51.508579],[125.010007, 51.529332],[125.051122, 51.535829],[125.086581, 51.560977],[125.078919, 51.618877],[125.120256, 51.666553],[125.139629, 51.642408],[125.223476, 51.632536],[125.307109, 51.623998],[125.360599, 51.628947],[125.451166, 51.556094],[125.491928, 51.523881],[125.536403, 51.494706],[125.564578, 51.469097],[125.586341, 51.448766],[125.590467, 51.434847],[125.613848, 51.41335],[125.632163, 51.402572],[125.633213, 51.386377],[125.649459, 51.372308],[125.677352, 51.348788],[125.707803, 51.336939],[125.722996, 51.314341],[125.735439, 51.294518],[125.755079, 51.274193],[125.760974, 51.240762],[125.777221, 51.232152],[125.804297, 51.231156],[125.832759, 51.230568],[125.848729, 51.220749],[125.859706, 51.208113],[125.886756, 51.168012],[125.877809, 51.153549],[125.885795, 51.144951],[125.911511, 51.141646],[125.928757, 51.134936],[125.941698, 51.128061],[125.954473, 51.114871],[125.997726, 51.126075],[125.996206, 51.109471],[125.990505, 51.094355],[125.984133, 51.09122],[126.039843, 51.063443],[126.068319, 51.042749],[126.059892, 51.037372],[126.047092, 51.005404],[126.064072, 50.983287],[126.082664, 50.969945],[126.066973, 50.96002],[126.046941, 50.939342],[126.036932, 50.909723],[126.003048, 50.909269],[126.009041, 50.88992],[125.982086, 50.902321],[125.95076, 50.878498],[125.91678, 50.865179],[125.920342, 50.832904],[125.877556, 50.800897],[125.853647, 50.775673],[125.785251, 50.773323],[125.803049, 50.74138],[125.813771, 50.717995],[125.795887, 50.683305],[125.807234, 50.640451],[125.83717, 50.571158],[125.809837, 50.547584],[125.781, 50.526161],[125.748803, 50.515205],[125.731173, 50.520931],[125.706109, 50.487066],[125.653056, 50.457328],[125.583868, 50.451837],[125.570688, 50.436108],[125.534895, 50.426415],[125.527476, 50.376752],[125.530104, 50.357427],[125.526004, 50.33123],[125.528696, 50.318644],[125.484815, 50.302164],[125.44945, 50.267467],[125.464204, 50.232006],[125.452573, 50.213384],[125.389412, 50.19373],[125.373058, 50.173496],[125.383803, 50.151122],[125.330065, 50.124933],[125.284511, 50.132228],[125.280251, 50.104084],[125.33874, 50.070212],[125.29861, 50.061711],[125.263448, 50.044023],[125.30313, 50.015129],[125.237759, 49.963975],[125.204642, 49.94966],[125.22031, 49.913085],[125.230201, 49.872426],[125.192984, 49.839707],[125.229456, 49.792371],[125.211858, 49.739793],[125.205693, 49.642685],[125.177702, 49.673655],[125.143733, 49.64115],[125.174617, 49.636866],[125.224432, 49.598001],[125.236729, 49.590231],[125.236686, 49.541109],[125.231377, 49.511519],[125.234307, 49.495419],[125.263365, 49.400748],[125.266353, 49.367272],[125.258443, 49.335258],[125.234329, 49.291242],[125.242066, 49.263232],[125.23478, 49.245998],[125.200561, 49.192913],[125.136956, 49.14501],[125.039835, 49.164495],[124.96055, 49.17055],[124.843788, 49.127951],[124.822502, 49.06594],[124.795603, 49.006173],[124.757928, 48.929826],[124.721102, 48.916769],[124.702663, 48.860564],[124.659474, 48.838652],[124.644412, 48.773426],[124.610486, 48.662906],[124.575762, 48.581714],[124.532765, 48.565327],[124.540817, 48.520649],[124.537598, 48.461834],[124.533249, 48.423942],[124.523355, 48.384148],[124.546213, 48.348896],[124.585946, 48.309981],[124.562068, 48.279868],[124.571616, 48.251667],[124.516968, 48.174412],[124.515185, 48.141022],[124.485247, 48.117884],[124.42984, 48.110531],[124.48118, 48.148051],[124.480261, 48.180595],[124.446392, 48.182882],[124.420915, 48.202903],[124.435954, 48.230469],[124.429191, 48.252057],[124.412598, 48.255689],[124.399686, 48.272974],[124.370852, 48.3021],[124.327516, 48.354679],[124.327684, 48.381246],[124.328334, 48.400671],[124.323575, 48.426155],[124.315943, 48.455032],[124.320156, 48.482664],[124.311658, 48.515517],[124.224373, 48.513125],[123.91503, 48.312249],[123.753461, 48.203568],[123.476482, 48.009915],[123.295689, 47.947632],[123.063356, 47.755068],[122.779298, 47.624682],[122.557391, 47.51268],[122.427104, 47.357936],[122.442633, 47.326639],[122.457949, 47.300126],[122.516324, 47.249278],[122.530843, 47.224846],[122.538898, 47.204895],[122.571625, 47.173292],[122.604322, 47.153763],[122.617743, 47.136999],[122.635475, 47.130464],[122.65987, 47.113479],[122.693933, 47.100716],[122.762995, 47.086198],[122.837903, 47.070436],[122.812551, 47.026709],[122.812029, 46.944392],[122.903862, 46.960547],[122.903745, 46.913624],[122.902491, 46.865224],[122.936121, 46.794311],[123.001645, 46.760013],[123.024592, 46.726977],[123.062471, 46.734716],[123.092624, 46.740203],[123.158145, 46.747436],[123.179729, 46.760384],[123.221621, 46.812327],[123.235865, 46.824652],[123.240342, 46.851629],[123.256814, 46.863347],[123.291982, 46.862673],[123.377654, 46.877633],[123.394727, 46.957941],[123.306471, 46.995694],[123.357158, 47.008437],[123.376749, 46.99702],[123.399926, 46.974618],[123.407641, 46.971706],[123.428483, 46.961314],[123.453878, 46.965702],[123.467374, 46.965784],[123.489449, 46.96126],[123.506306, 46.959043],[123.534094, 46.964298],[123.499715, 46.889018],[123.532014, 46.831852],[123.576457, 46.871234],[123.61442, 46.896458],[123.630303, 46.848662],[123.60176, 46.821311],[123.634522, 46.809414],[123.626368, 46.72732],[123.355827, 46.678848],[123.285199, 46.629194],[123.228221, 46.598322],[123.088435, 46.614646],[123.058849, 46.58587],[123.003516, 46.498857],[123.065569, 46.388973],[123.186593, 46.253416],[123.27526, 46.269429],[123.353155, 46.250163],[123.397294, 46.238726],[123.489707, 46.250721],[123.568908, 46.241342],[123.677472, 46.263438],[123.811997, 46.275155],[123.902434, 46.30938],[123.904037, 46.27056],[123.949709, 46.293836],[123.96649, 46.239352],[123.963217, 46.216391],[123.980899, 46.174113],[124.013491, 46.160089],[124.019372, 46.122303],[124.013009, 46.076746],[124.045143, 46.024001],[123.999252, 46.014574],[123.978687, 45.979234],[124.040517, 45.899769],[124.074822, 45.864968],[124.04548, 45.825527],[124.009139, 45.782974],[124.088355, 45.741718],[124.073865, 45.722222],[124.140824, 45.695177],[124.15061, 45.672192],[124.153279, 45.628814],[124.233921, 45.639314],[124.246248, 45.597581],[124.265904, 45.568446],[124.364639, 45.549478],[124.358307, 45.497273],[124.425699, 45.45283],[124.514067, 45.430388],[124.580964, 45.452094],[124.688612, 45.457053],[124.785052, 45.470297],[124.849958, 45.459512],[124.887328, 45.486088],[124.923848, 45.547289],[124.955906, 45.505618],[125.061882, 45.492402],[125.051502, 45.436506],[125.071526, 45.403309],[125.131704, 45.410441],[125.227478, 45.415716],[125.302981, 45.423513],[125.364267, 45.398635],[125.436778, 45.44926],[125.451015, 45.487195],[125.502482, 45.476887],[125.625996, 45.524959],[125.6957, 45.497164],[125.714897, 45.483615],[125.719788, 45.448401],[125.722954, 45.401442],[125.716839, 45.344792],[125.727696, 45.329576],[125.762965, 45.289578],[125.794435, 45.285944],[125.823138, 45.270877],[125.866512, 45.233507],[125.912032, 45.212502],[125.984248, 45.189975],[126.003929, 45.184614],[126.030606, 45.168289],[126.102973, 45.157247],[126.11979, 45.148694],[126.172997, 45.139287],[126.201261, 45.154287],[126.242075, 45.14637],[126.2645, 45.167732],[126.29676, 45.173113],[126.307917, 45.193626],[126.346272, 45.198862],[126.383684, 45.207594],[126.436314, 45.242067],[126.470791, 45.244357],[126.524985, 45.252614],[126.601543, 45.251836],[126.609787, 45.247186],[126.655492, 45.225012],[126.68302, 45.201101],[126.738007, 45.180781],[126.794633, 45.150219],[126.830926, 45.152826],[126.868038, 45.145779],[126.938116, 45.135994],[126.964127, 45.127718],[126.977513, 45.079435],[127.023417, 45.031069],[127.045239, 44.998956],[127.072899, 44.987727],[127.093399, 44.96376],[127.096757, 44.931571],[127.004436, 44.877629],[126.990888, 44.831352],[127.035014, 44.676614],[127.040691, 44.611631],[127.056019, 44.571778],[127.101538, 44.621963],[127.146153, 44.616821],[127.173812, 44.645055],[127.219917, 44.626488],[127.255116, 44.614583],[127.284029, 44.64567],[127.393858, 44.632762],[127.453451, 44.621912],[127.496183, 44.607825],[127.552261, 44.582967],[127.571812, 44.554172],[127.517352, 44.534393],[127.475075, 44.513043],[127.507603, 44.45589],[127.49197, 44.405245],[127.538543, 44.367267],[127.587483, 44.31602],[127.622725, 44.276031],[127.617617, 44.209725],[127.686096, 44.173306],[127.732481, 44.193778],[127.74195, 44.135673],[127.795474, 44.074788],[127.857791, 44.078709],[127.970743, 44.093122],[128.107494, 44.14094],[128.067442, 44.17551],[128.112682, 44.221215],[128.070811, 44.255917],[128.094798, 44.299548],[128.063604, 44.336653],[128.074007, 44.378454],[128.118952, 44.364534],[128.168987, 44.351546],[128.226357, 44.445463],[128.29918, 44.474746],[128.377792, 44.519943],[128.445242, 44.46584],[128.470151, 44.402109],[128.478954, 44.326654],[128.464161, 44.2468],[128.48848, 44.157229],[128.542165, 44.098676],[128.583852, 44.019058],[128.647229, 43.952648],[128.636912, 43.927132],[128.691154, 43.898709],[128.708318, 43.823688],[128.752584, 43.7702],[128.761317, 43.733674],[128.796409, 43.689966],[128.831259, 43.635894],[128.87223, 43.563685],[128.965965, 43.547786],[129.019239, 43.529951],[129.128147, 43.56329],[129.183782, 43.571415],[129.236954, 43.606714],[129.225544, 43.689297],[129.222367, 43.73077],[129.229163, 43.802399],[129.306765, 43.801871],[129.37834, 43.809259],[129.415477, 43.837966],[129.503016, 43.883443],[129.610995, 43.891973],[129.705743, 43.889198],[129.756302, 43.903795],[129.786917, 43.93915],[129.789253, 43.96866],[129.859639, 44.00517],[129.885361, 44.006375],[129.944324, 44.037569],[130.005509, 44.005818],[130.010441, 43.976331],[130.02401, 43.942514],[130.015338, 43.899944],[130.062194, 43.84641],[130.101312, 43.849898],[130.148316, 43.885339],[130.192172, 43.939142],[130.235539, 43.954853],[130.280256, 43.975783],[130.34162, 43.961737],[130.385688, 43.910253],[130.434061, 43.788181],[130.466192, 43.715141],[130.518295, 43.654222],[130.552141, 43.631439],[130.637515, 43.630033],[130.666751, 43.587704],[130.694057, 43.580963],[130.745903, 43.560996],[130.832078, 43.501033],[130.927949, 43.461138],[131.004228, 43.495301],[131.075502, 43.491644],[131.140981, 43.436234],[131.212407, 43.458488],[131.274411, 43.478015],[131.311072, 43.508718],[131.242914, 43.522255],[131.215372, 43.533091],[131.218971, 43.567637],[131.228721, 43.588702],[131.254436, 43.607949],[131.229237, 43.637526],[131.244245, 43.680484],[131.225446, 43.719073],[131.240953, 43.748484],[131.22502, 43.767667],[131.220166, 43.792193],[131.229369, 43.830596],[131.245925, 43.867175],[131.263971, 43.912621],[131.254071, 43.961421],[131.254282, 43.991338],[131.263533, 44.008553],[131.303952, 44.0516],[131.155731, 44.586761],[131.100189, 44.751016],[131.070868, 44.793461],[131.029986, 44.804492],[130.977095, 44.826308],[130.984858, 44.863434],[131.026878, 44.875504],[131.053475, 44.878778],[131.104581, 44.89872],[131.114543, 44.944353],[131.180027, 44.942961],[131.210819, 44.937572],[131.262075, 44.935988],[131.319399, 44.956796],[131.360039, 44.988263],[131.436218, 44.984487],[131.50772, 44.985917],[131.504665, 45.008676],[131.55022, 45.025323],[131.593893, 45.059106],[131.701268, 45.133666],[131.658932, 45.165533],[131.689339, 45.228054],[131.766413, 45.221035],[131.841247, 45.30489],[131.883804, 45.341456],[131.924372, 45.344228],[131.985001, 45.282555],[132.875998, 45.067452],[132.897584, 45.048117],[132.921154, 45.044672],[132.935652, 45.036543],[132.956454, 45.028322],[132.960545, 45.024297],[132.978443, 45.030286],[132.993727, 45.037326],[132.994942, 45.049221],[133.008571, 45.047262],[133.027977, 45.055305],[133.051539, 45.064231],[133.04943, 45.078358],[133.065976, 45.088895],[133.076091, 45.102873],[133.095729, 45.109221],[133.114563, 45.120888],[133.133565, 45.132482],[133.142146, 45.144959],[133.134324, 45.143034],[133.141135, 45.16994],[133.139513, 45.183897],[133.140531, 45.206717],[133.134504, 45.225038],[133.122411, 45.231835],[133.11966, 45.243947],[133.113652, 45.251974],[133.100924, 45.261938],[133.116027, 45.280037],[133.105279, 45.280069],[133.113312, 45.29799],[133.119534, 45.311323],[133.113671, 45.320362],[133.127443, 45.332949],[133.130545, 45.35336],[133.140478, 45.368613],[133.148002, 45.370906],[133.151822, 45.399705],[133.147803, 45.411748],[133.149129, 45.434004],[133.179105, 45.449101],[133.176401, 45.462222],[133.177455, 45.471573],[133.189523, 45.487027],[133.197809, 45.502155],[133.217648, 45.518298],[133.226854, 45.522588],[133.255259, 45.528976],[133.283698, 45.539582],[133.300812, 45.545689],[133.316405, 45.555085],[133.332643, 45.557527],[133.357038, 45.569616],[133.371506, 45.575238],[133.390309, 45.588235],[133.417178, 45.579198],[133.419621, 45.607045],[133.440787, 45.634502],[133.459057, 45.645623],[133.499132, 45.677241],[133.460008, 45.711207],[133.445529, 45.713208],[133.493092, 45.753585],[133.489044, 45.788861],[133.486329, 45.798819],[133.481662, 45.843762],[133.517555, 45.871813],[133.563775, 45.898185],[133.601358, 45.890596],[133.612629, 45.939837],[133.684326, 45.958266],[133.719773, 46.025666],[133.713045, 46.115546],[133.763083, 46.175761],[133.81953, 46.23638],[133.858161, 46.209332],[133.868491, 46.249116],[133.924421, 46.271279],[133.92915, 46.340612],[133.878312, 46.364141],[133.955996, 46.405718],[133.868797, 46.452003],[133.898212, 46.532145],[133.917882, 46.589335],[134.006177, 46.636373],[134.040256, 46.765468],[134.029315, 46.836097],[134.062407, 46.901419],[134.070798, 46.985717],[134.127142, 47.074201],[134.208203, 47.101651],[134.237099, 47.188334],[134.163112, 47.263273],[134.246837, 47.359171],[134.353973, 47.444758]]
			            }
			        ]
			    });
			}, 0);


			function renderBrushed(params) {
			    var mainSeries = params.batch[0].selected[0];

			    var selectedItems = [];
			    var categoryData = [];
			    var barData = [];
				var pie1Data = [];
				var pie2Data = [];
			    var maxBar = 30;
			    var sum = 0;
			    var count = 0;

			    for (var i = 0; i < mainSeries.dataIndex.length; i++) {
			        var rawIndex = mainSeries.dataIndex[i];
			        var dataItem = convertedData[0][rawIndex];
			        var pmValue = dataItem.value[2];

			        sum += pmValue;
			        count++;

			        selectedItems.push(dataItem);
			    }

			    selectedItems.sort(function (a, b) {
			        return a.value[2] - b.value[2];
			    });

			    for (var i = 0; i < Math.min(selectedItems.length, maxBar); i++) {
			        categoryData.push(selectedItems[i].name);
			        barData.push(selectedItems[i].value[2]);
					pie1Data.push({
						"name" : selectedItems[i].name,
						"value" : selectedItems[i].value[2]
					});
					pie2Data.push({
						"name" : selectedItems[i].name,
						"value" : 1
					});
			    }
			    
			    this.setOption({
			        yAxis: {
			            data: categoryData
			        },
			        xAxis: {
			            axisLabel: {show: !!count}
			        },
			        title: {
			            id: 'statistic',
			            text:  count ? '总数: ' + sum + '个  平均: ' + (sum / count).toFixed(1)  + '个' : ''
			        },
			        series: [
					{
			            id: 'bar',
			            data: barData
			        },{
			            id: 'pie1',
			            data: pie1Data
			        },{
			            id: 'pie2',
			            data: pie2Data
			        }]
			    });
			}
		},
		error : function(data) {
			alert("请检查网络连接");
		}
	});
}
